package com.right.dao.impl;

import java.util.List;

import com.Tools.DBTools;
import com.right.dao.OrderstatusDao;
import com.right.entity.Orderstatus;


public class OrderstatusDaoImpl implements OrderstatusDao {

	@Override
	public boolean updateOrderstatus(String typename, int orderstatus) {
		String sql="update  orderstatus  set  typename =? where orderstatus=? ";
	     int hang=     	DBTools.exUpdate(sql,typename, orderstatus);
	     if(hang>0) {return true;
	     }else {
	    	 return false;
	     }
	}
	@Override
	public List<Orderstatus> checkorderstatus(int orderstatus) {
		String sql="select * from orderstatus where orderstatus=? ";
	  return   (List<Orderstatus>) 	DBTools.exQuery(sql, Orderstatus.class,  orderstatus);
	}

}
